/*
 * @(#)EmailMessageSenderComparator.java
 *
 * Copyright (c) 2004 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */

package com.dcivision.upgrade.handler;

import com.dcivision.upgrade.UpgradeException;
import com.dcivision.upgrade.UpgradeExceptionHandler;
import com.dcivision.upgrade.UpgradeState;

/**
 * Upgrade handler interface that all version of upgrade handlers must implement
 * 
 * @author      henry.chan
 * @author      Brook.Huang
 * @company     DCIVision Limited
 * @creation    19/04/2007
 * @version     $Revision: 1.2 $
 * 
 */
public interface UpgradeHandler {

  /**
   * Kick start upgrade.
   */
  public void upgrade();

  public UpgradeState getUpgradeState();

  public boolean addHandler(UpgradeHandler handler);

  public boolean removeHandler(UpgradeHandler handler);

  public void raiseException(Throwable exception) throws UpgradeException;

  public void addUpgradeExceptionHandler(UpgradeExceptionHandler exceptionHandler);

  public void removeUpgradeExceptionHandler(UpgradeExceptionHandler exceptionHandler);

}
